package com.apes.auto.maintain.model;

import com.apes.framework.jpa.ApesBean;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * @ClassName AdHocRule
 * @Description 部分特定规则
 * @Author pengyb
 * @Date 2019/8/8 17:16
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = AdHocRule.CONST_TABLE_NAME)
public class AdHocRule implements ApesBean {
    public static final String CONST_TABLE_NAME = "jg_custom";

    @Id
    @Column(name = "id", length = 32)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "部分特定规则")
    private String id;

    @Column(name = "YJFS", length = 16)
    @Comment("引进方式")
    private String YJFS;

    @Column(name = "LC", length = 11)
    @Comment("里程(公里)")
    private Integer LC;

    @Column(name = "SJ", length = 11)
    @Comment("时间(月)")
    private Integer SJ;

    @Column(name = "ZDJG", columnDefinition = "number(20,2)")
    @Comment("指导价格（万）")
    private Integer ZDJG;


    @Column(name = "JCYLX", length = 16)
    @Comment("基础油类型")
    private String JCYLX;

    @Column(name = "YPGG", length = 32)
    @Comment("油品规格")
    private String YPGG;

    @Column(name = "PL", length = 32)
    @Comment("排量")
    private String PL;
}
